package com.njupt.swg.threadstudyjimin.item05.singleton;

import com.njupt.swg.threadstudyjimin.annotation.ThreadSafe;

/**
 * 饿汉模式，线程安全
 */
@ThreadSafe
public class SingletonExample2 {
    private SingletonExample2(){}

    private static SingletonExample2 instance = new SingletonExample2();

    public static SingletonExample2 getInstance(){
        return instance;
    }
}
